package org.dandelion.calendar;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DaySQLiteOpenHelper extends SQLiteOpenHelper {
    public DaySQLiteOpenHelper(Context context) {
        super(context, "toolbox", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        StringBuffer sql = new StringBuffer();
        sql.append("create table data(");
        sql.append("id integer primary key autoincrement,");
        sql.append("month varchar(20),");
        sql.append("day varchar(20),");
        sql.append("text varchar(20))");
        db.execSQL(sql.toString());
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("alter table person add account varchar(20) default 1000");
    }
}
